home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / test / heap.v < prev    next >
Text File  |  1990-05-19  |  983b  |  205 lines

  1. Testing Heap
  2. 100
  3. 70
  4. 76
  5. 22
  6. 101
  7. 54
  8. 60
  9. 2
  10. 5
  11. 601
  12. Test asHeap function
  13. OrderedCltn as Heap:
  14. 2
  15. 5
  16. 22
  17. 54
  18. 60
  19. 70
  20. 76
  21. 100
  22. 101
  23. 601
  24. Test isEqual function
  25. SUCCESS
  26. SUCCESS
  27. SUCCESS
  28. b = (1,1)
  29. (1,2)
  30. (1,3)
  31. (1,3)
  32. c = (1,1)
  33. (1,2)
  34. (1,3)
  35. (1,3)
  36. c = 
  37. c.removeId(D)->isSame(D): 1
  38. b.first(): (1,1)
  39. b.last(): (1,3)
  40. b = (1,1)
  41. (1,2)
  42. (1,3)
  43. (1,3)
  44. (4,5)
  45. remove min from b (1,1)
  46. remove max from b (4,5)
  47. b= (0,1)
  48. (0,1)
  49. (1,1)
  50. (1,2)
  51. (1,2)
  52. (1,2)
  53. (3,2)
  54. (1,3)
  55. (1,3)
  56. (1,4)
  57. (5,6)
  58. (9,8)
  59.  
  60. occurrencesOf((1,2)): 3
  61. b.sort(): (0,1)
  62. (0,1)
  63. (1,1)
  64. (1,2)
  65. (1,2)
  66. (1,2)
  67. (3,2)
  68. (1,3)
  69. (1,3)
  70. (1,4)
  71. (5,6)
  72. (9,8)
  73. b.asSet(): (1,1)
  74. (1,4)
  75. (1,3)
  76. (9,8)
  77. (3,2)
  78. (0,1)
  79. (5,6)
  80. (1,2)
  81.  
  82. Testing remove(Object&)
  83. 5
  84. 8
  85. 10
  86. 12
  87. 13
  88. 14
  89. 15
  90. 15
  91. 16
  92. 17
  93. 18
  94. 20
  95. 25
  96. 27
  97. 28
  98. 30
  99. 30
  100. 31
  101. 32
  102. 34
  103. 36
  104. 37
  105. 38
  106. 39
  107. 45
  108. 45
  109. 50
  110. 57
  111. 59
  112. 65
  113. 80
  114.  
  115. 5
  116. 8
  117. 12
  118. 13
  119. 14
  120. 15
  121. 15
  122. 16
  123. 17
  124. 18
  125. 20
  126. 25
  127. 27
  128. 28
  129. 30
  130. 30
  131. 31
  132. 32
  133. 34
  134. 36
  135. 37
  136. 38
  137. 39
  138. 45
  139. 45
  140. 50
  141. 57
  142. 59
  143. 65
  144. 80
  145.  
  146. 5
  147. 8
  148. 12
  149. 13
  150. 14
  151. 15
  152. 15
  153. 16
  154. 17
  155. 18
  156. 20
  157. 25
  158. 27
  159. 28
  160. 30
  161. 30
  162. 31
  163. 32
  164. 34
  165. 36
  166. 37
  167. 38
  168. 39
  169. 45
  170. 45
  171. 50
  172. 57
  173. 59
  174. 65
  175.  
  176. 5
  177. 8
  178. 12
  179. 13
  180. 14
  181. 15
  182. 15
  183. 16
  184. 17
  185. 20
  186. 25
  187. 27
  188. 28
  189. 30
  190. 30
  191. 31
  192. 32
  193. 34
  194. 36
  195. 37
  196. 38
  197. 39
  198. 45
  199. 45
  200. 50
  201. 57
  202. 59
  203. 65
  204.  
  205.